r = 1 gotturkeyleg = 0 gotknife = 0 unclepete = 1 mom = 1 dad = 1 hitler = 1 SCREEN 12 COLOR 7, 0 CLS DIM SHARED DOOM AS DOUBLE Minutes = 10 Seconds = 0 GameTime = Minutes * 60 + Seconds DIM directions(1 TO 12) AS STRING directions(1) = "NORTH" directions(2) = "NORTH, SOUTH, OR EAST" directions(3) = "NORTH OR WEST" directions(4) = "SOUTH" directions(5) = "NORTH, SOUTH, OR WEST" directions(6) = "EAST" directions(7) = "NORTH OR SOUTH" directions(8) = "NORTH OR SOUTH" directions(9) = "EAST OR SOUTH" directions(10) = "NORTH OR WEST" directions(11) = "NORTH OR SOUTH" directions(12) = "SOUTH" PRINT "" PRINT "" PRINT "Well it's Thanksgiving once again and you are enjoying the time off from school." PRINT "Since the events of the last game where Hitler tried to ruin Christmas for you," PRINT "for whatever reason, but that's not the point. It's Turkey Day and what could" PRINT "go wrong?" PRINT "" DO: LOOP UNTIL INKEY$ <> "" DOOM = TIMER(0.001) + GameTime 'change this to to desied time for the game to run DO CLS PRINT PRINT PRINT " " PRINT " " PRINT " " PRINT " Thanksgiving Adventure " PRINT " " PRINT " Written by " PRINT " " PRINT " D.B. Taylor" PRINT "" PRINT " Copyright (c) 2015" PRINT "" PRINT SPACE$(38); IF INSTR(directions(r), "NORTH") THEN PRINT "N" ELSE PRINT PRINT "*---------------------------------* "; IF INSTR(directions(r), "WEST") THEN PRINT "W"; ELSE PRINT " "; PRINT " + "; IF INSTR(directions(r), "EAST") THEN PRINT "E"; ELSE PRINT " "; PRINT " *------------------------------------*" PRINT SPACE$(38); IF INSTR(directions(r), "SOUTH") THEN PRINT "S" ELSE PRINT PRINT PRINT "If you are stuck just type HELP." PRINT GOSUB ROOM GOSUB parser LOOP ROOM: IF r = 1 THEN: GOSUB r1 IF r = 2 THEN: GOSUB r2 IF r = 3 THEN: GOSUB r3 IF r = 4 THEN: GOSUB r4 IF r = 5 THEN: GOSUB r5 IF r = 6 THEN: GOSUB r6 IF r = 7 THEN: GOSUB r7 IF r = 8 THEN: GOSUB r8 IF r = 9 THEN: GOSUB r9 IF r = 10 THEN: GOSUB r10 IF r = 11 THEN: GOSUB r11 IF r = 12 THEN: GOSUB r12 RETURN parser: PRINT "> "; cmd$ = GrabInput cmd$ = LTRIM$(RTRIM$(UCASE$(cmd$))) IF cmd$ = "END" OR cmd$ = "QUIT" OR cmd$ = "EXIT" OR cmd$ = "Q" THEN END END IF IF cmd$ = "HELP" OR cmd$ = "H" OR cmd$ = "?" THEN CLS PRINT "HERE ARE SOME BASIC COMMANDS THAT CAN BE USED IN THE GAME..." PRINT PRINT "NORTH, EAST ,SOUTH, AND WEST - MOVE TO AN AVAILABLE LOCATION" PRINT "EXAMINE (OBJECT) - EXAMINE AN OBJECT" PRINT "USE (OBJECT) - USE AN OBJECT" PRINT "TAKE (OBJECT) - TAKE OR MOVE AN OBJECT" PRINT "INVENTORY - VIEW YOUR INVENTORY" PRINT "DRINK - DRINK BEER" PRINT "UNLOCK - UNLOCK DOOR" PRINT "HELP - VIEW THIS SCREEN" PRINT "END - END GAME" PRINT PRINT "PRESS ANY KEY...": SLEEP DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF cmd$ = "INVENTORY" OR cmd$ = "INV" OR cmd$ = "ITEMS" OR cmd$ = "I" THEN CLS PRINT "INVENTORY..." PRINT IF gotknife = 1 THEN: PRINT "Knife" IF gotturkeyleg = 1 THEN: PRINT "Turkey Leg" PRINT PRINT "PRESS ANY KEY..." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF cmd$ = "GO NORTH" OR cmd$ = "NORTH" OR cmd$ = "N" THEN IF r = 1 THEN: r = 2: GOTO moved IF r = 2 THEN: r = 5: GOTO moved IF r = 5 THEN: r = 7: GOTO moved IF r = 7 THEN: r = 8: GOTO moved IF r = 8 THEN: r = 9: GOTO moved IF r = 3 THEN: r = 4: GOTO moved IF r = 10 THEN: r = 11: GOTO moved IF r = 11 THEN: r = 12: GOTO moved END IF IF cmd$ = "GO EAST" OR cmd$ = "EAST" OR cmd$ = "E" THEN IF r = 2 THEN: r = 3: GOTO moved IF r = 6 THEN: r = 5: GOTO moved IF r = 9 THEN: r = 10: GOTO moved END IF IF cmd$ = "GO SOUTH" OR cmd$ = "SOUTH" OR cmd$ = "S" THEN IF r = 12 THEN: r = 11: GOTO moved IF r = 11 THEN: r = 10: GOTO moved IF r = 9 THEN: r = 8: GOTO moved IF r = 8 THEN: r = 7: GOTO moved IF r = 7 THEN: r = 5: GOTO moved IF r = 5 THEN: r = 2: GOTO moved IF r = 2 THEN: r = 1: GOTO moved IF r = 4 THEN: r = 5: GOTO moved END IF IF cmd$ = "GO WEST" OR cmd$ = "WEST" OR cmd$ = "W" THEN IF r = 10 THEN: r = 9: GOTO moved IF r = 5 THEN: r = 6: GOTO moved IF r = 3 THEN: r = 2: GOTO moved END IF IF (cmd$ = "TALK TO MOM") AND r = 4 THEN CLS PRINT "She ignores you, as she's busy making sure everything it done right." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "TALK TO HITLER") AND r = 12 THEN CLS PRINT "I told you that I was to return. To seek revenge upon what you had done" PRINT "to me during last Christmas. If you haven't played Christmas Adventure," PRINT "give it a try." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE MEAL") AND r = 4 THEN CLS PRINT "Everything is laid out on the table, Turkey, stuffing, cranberries, and" PRINT "only the finest boxed wine. Yummy." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE TURKEY LEG") AND gotturkeyleg = 1 THEN CLS PRINT "A crisp Turkey leg, it almost looks like a club that a caveman would" PRINT "use." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE KNIFE") AND gotknife = 1 THEN CLS PRINT "A standard kitchen knife. Meant for cutting meat with ease." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "CARVE TURKEY") AND gotknife = 1 THEN CLS GOTO lose: DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "USE KNIFE") AND gotknife = 1 AND r = 12 THEN CLS GOTO win1: DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "USE TURKEY LEG") AND gotturkeyleg = 1 AND r = 12 THEN CLS GOTO win: DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "TAKE TURKEY LEG") AND gotturkeyleg = 0 AND r = 3 THEN gotturkeyleg = 1 PRINT "You have taken the Turkey Leg." END IF IF (cmd$ = "TAKE KNIFE") AND gotknife = 0 AND r = 4 THEN gotknife = 1 PRINT "You have taken the Knife." END IF moved: RETURN r1: PRINT "You are standing in the entranceway of your parents house, it's" PRINT "where you live, since you are still a student at Gein Jr. High." RETURN r2: PRINT "The smell of the turkey loomed throughout the house. The walls are" PRINT "covered with a retro wallpaper. Something that you'd find in a motel" PRINT "off the beaten path." RETURN r3: PRINT "The aroma of the finely crafted meal wofts through the entire house." PRINT "You see your Dad running around making sure everything is just right." PRINT "As for your Uncle, he's already seated, and partaking in the finest" PRINT "boxed wine." IF gotturkeyleg = 0 THEN: PRINT "The golden crisp Turkey Leg, is calling to you." IF gotturkeyleg = 1 THEN: PRINT "This looks good enough to eat or to club someone with?" RETURN r4: PRINT "The kitchen looks as if a bomb went off in it. Mom, is busy, making" PRINT "sure everything is just right. You can just waltz right in and take" PRINT "a glass of wine but you won't." IF gotknife = 0 THEN: PRINT "A large kitchen knife rests on the counter." IF gotknife = 1 THEN: PRINT "You tight'll grip the handle, like a mad man." RETURN r5: PRINT "You enter the short hallway and realize that home is always the best" PRINT "place to be during the holidays." RETURN r6: PRINT "You are standing in what would be the bathroom. But again, why" PRINT "would there be a bathroom in an Adventure game?" RETURN r7: PRINT "The hallway seems to be alive in such a way that you feel as if you" PRINT "are being watched? Funny how you get that feeling sometimes." RETURN r8: PRINT "With every step you take, your footsteps echo through the hallway." RETURN r9: PRINT "You reach a sharp right turn towards your room. Now the feeling grows" PRINT "with every moment that passes you have a sick feeling overcome you." RETURN r10: PRINT "A sharp chrisp cool breeze passes through the hallway. Like someone" PRINT "left a window open. It's mid-October afterall." RETURN r11: PRINT "You stand before the entrance of your room. You notice the door open," PRINT "which is odd cause you never leave the door open?" RETURN r12: PRINT "You enter the room and find that Old man Hitler is standing in front of" PRINT "your bed. The window by your bed is wide open as it starts to snow outside." PRINT "Now why does this always seem to happen to you?" RETURN win: COLOR 2, 0 CLS PRINT "Once again it's over. You raise the Turkey Leg in the air" PRINT "like a Knight weilding his mighty sword and crack Hitler" PRINT "upside the head. That'll teach him in trying to ruin this" PRINT "most excellent holiday. First Christmas and now Thanksgiving." PRINT "What's next Easter? God only knows. But hey, it's time for" PRINT "Turkey, eat, and enjoy your time with the Family...What's this?" PRINT "Hitler escaped..." PRINT DO: LOOP UNTIL INKEY$ <> "" END win1: COLOR 2, 0 CLS PRINT "You take out the knife and just as you charge him, he grabs" PRINT "your wrist, and deflects your attack. Swiftly, he pushes" PRINT "you to the ground and makes his escape from the open the" PRINT "window. -Till we meet again!- He says with a sickly grin. As" PRINT "he vanished before you, you return downstairs and find that" PRINT "no one has noticed the racket. Dad carves the Turkey, mom enjoys" PRINT "her glass of wine, and your Uncle mutters something about" PRINT "Turkey's and why they need to die. And Hitler...he'll be back." PRINT DO: LOOP UNTIL INKEY$ <> "" END lose: COLOR 2, 0 CLS PRINT "Before everyone was able to sit down and enjoy the wonderful" PRINT "meal that your parents slaved over. You decided to ruin it" PRINT "by carving the Turkey and making up a plate. Now everyone's" PRINT "mad at you. Better test out the locks on your door before" PRINT "going to sleep." PRINT DO: LOOP UNTIL INKEY$ <> "" END FUNCTION GrabInput$ x = POS(0) y = CSRLIN maxwidth = _WIDTH - x PCOPY 0, 1 'make a backup copy of the screen DO k = _KEYHIT i$ = INKEY$ LOOP UNTIL k = 0 AND INKEY$ = "" 'clear the keyboard buffer DO _LIMIT 30 PCOPY 1, 0 LOCATE y, x: PRINT Userinput$ k = _KEYHIT SELECT CASE k CASE 8 Userinput$ = LEFT$(Userinput$, LEN(Userinput$) - 1) CASE 65 TO 90, 97 TO 122, 32 Userinput$ = UCASE$(Userinput$ + CHR$(k)) END SELECT timerleft## = (DOOM - TIMER(0.001)) minutes = timerleft## \ 60 seconds = timerleft## - minutes * 60 LOCATE 2, 32: PRINT USING " ###:##.###"; minutes, seconds IF timerleft## <= 0 THEN GOTO doomed _DISPLAY LOOP UNTIL k = 13 GrabInput$ = Userinput$ _AUTODISPLAY EXIT FUNCTION doomed: CLS PRINT "It is to late, Hitler stole the Turkey and punched out your Dad and" PRINT "stole what was left of the boxed wine. Next time try to do a better" PRINT "job. This isn't a complex game." _DISPLAY END END SUB